feat: Add America/Coyhaique timezone support#16362
feat: Add America/Coyhaique timezone support#16362n0r0shi wants to merge 1 commit intofacebookincubator:mainfrom
Conversation
✅ Deploy Preview for meta-velox canceled.
|
5dd591e to
2ae9467
Compare
|
Hi @n0r0shi The Timezonedatabase file is autogenerated and based on what is supported by Presto. We can make this change after prestodb/presto#26981 lands in Presto. |
|
@kgpai Thanks for the context. I understand that prestodb/presto#26981 needs to be merged first since Velox pulls its timezone database from Presto. That's exactly why I've kept this PR as a draft. I'm happy to wait until the Presto change lands, and I'll rebase and mark it ready for review once it does. |
Add America/Coyhaique (timezone ID 2234) to the timezone database and timezone names, following the Presto zone-index convention. Also fix the namespace in gen_timezone_database.py (util -> tz) to match the current codebase. America/Coyhaique was added to the IANA timezone database in tzdata 2025b. The upstream Presto PR (prestodb/presto#26981) has been merged. Fixes facebookincubator#16216
2ae9467 to
c82e833
Compare
|
Updated this PR — it's no longer a draft since the upstream Presto PR (prestodb/presto#26981) has been merged. Changes since the original version:
Ready for review. @rui-mo @zhli1142015 @kgpai |
rui-mo
left a comment
There was a problem hiding this comment.
@n0r0shi It looks like the Presto version currently used in the fuzzer tests doesn’t include this change yet, which is causing the below failure. You may need to skip this timezone in the fuzzer tests until the Presto version is updated.
E20260307 03:40:21.303088 450 Exceptions.h:53] Line: /__w/velox/velox/velox/velox/exec/fuzzer/PrestoQueryRunner.cpp:119, Function:throwIfFailed, Expression: Presto query failed: 7 Invalid format: "36037-07-22 16:57:47.864 America/Coyhaique" is malformed at "America/Coyhaique", Source: RUNTIME, ErrorCode: INVALID_STATE
Summary
America/Coyhaique(timezone ID 2234) toTimeZoneDatabase.cpp, following the Presto zone-index conventionTimeZoneNames.cpp(Coyhaique Standard Time,Coyhaique Daylight Time)gen_timezone_database.py(facebook::velox::util→facebook::velox::tz)America/Coyhaiquewas added to the IANA timezone database in tzdata 2025b (JDK 17+). Systems running newer tzdata include this zone, but Velox rejects it because it's not in the hardcoded timezone ID map, causing queries withsession_timezone = 'America/Coyhaique'to fail.The upstream Presto PR (prestodb/presto#26981) adding this zone to
zone-index.propertieshas been merged.How the files were generated
TimeZoneDatabase.cpp — generated from the Presto
zone-index.properties:./velox/type/tz/gen_timezone_database.py \ -f /path/to/zone-index.properties \ > velox/type/tz/TimeZoneDatabase.cppTimeZoneNames.cpp — short and long names obtained from Java's
DateFormatSymbols(openjdk 17):javac velox/type/tz/GenTimeZoneNames.java java velox.type.tz.GenTimeZoneNames > velox/type/tz/TimeZoneNames.cppThe entry was added manually to avoid a noisy full-file diff from formatting differences.
Related
Test plan
getTimeZoneName(2234)returns"America/Coyhaique"getTimeZoneID("America/Coyhaique")returns2234TimeZoneDatabase.cppmatches committed file exactly